import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';

part 'config_event.dart';

part 'config_state.dart';

class ConfigBloc extends Bloc<ConfigEvent, ConfigState> {
  ConfigBloc() : super(ConfigState().init());

  @override
  Stream<ConfigState> mapEventToState(ConfigEvent event) async* {
    if(event is AppBarEvent){
      var state1 = state.copy()..appBarColor=event.appBarColor;
      yield state1;
    }
  }
}
